/*var mdm_test = new demos.ROSpanel3({
    id: 'test',
	items: [{
            id: 'xhoh',
            name: 'xhoh',
            text: 'HOH',
        }, {
            id: 'xnosebleed',
            name: 'xnosebleed',
            text: 'Nosebleeds',
        }, {
            id: 'xsinusprob',
            name: 'xsinusprob',
            text: 'Sinus Problems',
        }, {
            id: 'xearprob',
            name: 'xearprob',
            text: 'Ear Problems',
	}]
}); */

var firstmdm = new demos.MDMpanel({
	id: 'mdm1',
	name: 'mdm1',
	idcount: 0,
	MDMtitle: [{
        id: 'mdm1',
        name: 'mdm1',
    }],
});


demos.MDM = Ext.extend(Ext.Panel, {
	title: 'MDM',
	id: 'mdm',
    fullscreen: true,
    scroll: 'vertical',
    cardSwitchAnimation: 'slide',
    iconCls: 'iconMedD',
//    layout: 'fit',
    centered: true,
    hpicount: 0,
//    floating: true,
//    modal: true,

    initComponent: function() {
    	
/*        Ext.apply(this, {
                dockedItems: [
                { xtype: 'toolbar',
                dock: 'top',
                title: 'Patient',
                centered: true,
			items: [{
                        text: 'back',
                        ui: 'back',
                        handler: function() {
                            if (Ext.is.Phone) demos.Tabcontrol.tabBar.setVisible(true);
                            sink.Main.ui.setActiveItem(demos.Maincontrol, {type: 'slide', direction: 'right'});
                            sink.Main.ui.currentCard = demos.Maincontrol;
//                            demos.Tabcontrol.tabBar.setActiveItem('patients', {type: 'slide', direction: 'right'})
                        }
                    }, {
                        xtype: 'spacer'
                    }, {
                        text: 'save',
                        ui: 'confirm',		
                        handler: function() {
                            var patientbadge = demos.patientscard.tab;
                            badgeNumber = parseInt(patientbadge.badgeText);
                            nextNumber = isNaN(badgeNumber) ? '' : badgeNumber-1;
                            patientbadge.setBadge(nextNumber);
//  KR                            ROSpanel.btnCount = 0;;
//                            Ext.getCmp('const1').setBadge('');
//  KR                          if (ToolbarDemo.isPhone()) ToolbarDemo.views.viewport.tabBar.setVisible(true);
//  KR                          ToolbarDemo.views.viewport.remove(ToolbarDemo.views.viewport.getActiveItem());
//  KR                          ToolbarDemo.views.viewport.setActiveItem('patients', {type: 'slide', direction: 'right'})
                        }
                    }]
                }]
        }); */
    	
        Ext.apply(this, {
            fullscreen: true,
            scroll: 'vertical',
            dock: 'top',
            hpicount: 0,
        	items: [
        	    firstmdm
/*        		new demos.MDMpanel({
					ui: 'dark',
				    id: 'mdm2',
					MDMtitle: [{
				        id: 'mdm2',
				        name: 'mdm2',
				        text: Ext.is.Phone ? 'TEST2' : 'TEST2 ALSO'
				    }],
					MDMitems: [{
				            id: 'test2',
				            name: 'test2',
				            text: 'Weight Gain2',
					}]
				})*/
        	]
        });
        demos.MDM.superclass.initComponent.apply(this, arguments);
    }
});

Ext.reg('mdm', demos.MDM);
